System functions provide access to information in the Teiid system from within a query.
Retrieve a string from the command payload or null if no command payload was specified. The command payload is set by the TeiidStatement.setPayload method on the Teiid JDBC API extensions on a per-query basis.
COMMANDPAYLOAD([key])
If the key parameter is provided, the command payload object is cast to a java.util.Properties object and the corresponding property value for the key is returned. If the key is not specified the return value is the command payload object toString value.
key, return value are strings
Retrieve a system environment property.
ENV(key)
To prevent untrusted access to system properties, this function is not enabled by default. The ENV function may be enabled via the allowEnvFunction property in the file.
key, return value are strings
Retrieve the string form of the current session id.
SESSION_ID()
return value is string.
Retrieve the name of the user executing the query.
USER()
return value is string.
Retrieve the catalog name of the database. The VDB name is always the catalog name.
CURRENT_DATABASE()
return value is string.